package com.willen.service;

import java.util.List;

import com.willen.dao.AdminDao;
import com.willen.entity.Admin;

public class AdminService {
	public Admin login(String username,String password){
		AdminDao adminDao=new AdminDao();
		List<Admin> admins=adminDao.fingByUserName(username);
		if(admins==null||"".equals(admins)){
			
		}else{
			for(Admin admin:admins){
				if(password.equals(admin.getPassword())){
					return admin;
				}
			}
			
		}
		return null;
	}
}
